package com.qunar.wan.web.controller;

import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by cyoung on 1/9/14.
 */
@Controller
public class TestController {

    @RequestMapping(value = "/test/entity")
    public ResponseEntity<String> responseEntityCustomHeaders() {
        HttpHeaders headers = new HttpHeaders();
        headers.setContentType(MediaType.TEXT_PLAIN);
        return new ResponseEntity<String>("The String ResponseBody with custom header Content-Type=text/plain",
                headers, HttpStatus.OK);
    }
}
